home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_87 / vtglobal.pas < prev    next >
Pascal/Delphi Source File  |  1995-01-01  |  4KB  |  102 lines

  1. {****************************************************************************}
  2. {                                                                            }
  3. { MODULE:         VTGlobal                                                   }
  4. {                                                                            }
  5. { DESCRIPTION:    Provides definitions of constants and global variables     }
  6. {                 of the VangeliSTracker. To be used by all of the VT units. }
  7. {                                                                            }
  8. { AUTHOR:         Juan Carlos Arévalo                                        }
  9. {                                                                            }
  10. { MODIFICATIONS:  Nobody (yet ;-)                                            }
  11. {                                                                            }
  12. { HISTORY:        17-Oct-1992 Documentation.                                 }
  13. {                                                                            }
  14. { (C) 1992 VangeliSTeam                                                      }
  15. {____________________________________________________________________________}
  16.  
  17. UNIT VTGlobal;
  18.  
  19. INTERFACE
  20.  
  21. USES Dos,
  22.      SoundDevices, DevSpkr;
  23.  
  24. CONST
  25.   NombreApp = 'VangeliSTracker';              { El nombre de la aplicación (para            }
  26.                                               { usarlo en unos cuantos sitios).             }
  27.   Version       = '1.2b';                     { Número de versión, en formato X.Yz          }
  28.   NoBetaPadding = '    v'{'v'       };
  29.   BetaStr       = ''     {' (beta)' };
  30.   BetaPadStr    = '    ' {'  (beta)'};
  31.   Beta          = FALSE  {TRUE      };        { TRUE si es una versión beta.                }
  32.  
  33.   VTDir        : DirStr       = '';           { Directorio donde se encontraba el VT.EXE    }
  34.  
  35.  
  36.  
  37.   DevPtr       : PSoundDevice = NIL;          { Puntero al device que se usa.               }
  38.   DevID        : TDevID       = SpkrDevID;    { Identificador del device que se usa.        }
  39.  
  40.   StartupScr   : STRING[32]   = '';           { Pantalla con la que comienza VT.            }
  41.  
  42.   PermitFade   : BOOLEAN      = TRUE;         { TRUE si se permite el fade-out.             }
  43.   VTVolume     : BYTE         = 127;          { Volumen general del programa.               }
  44.  
  45.   ShellLoopMod : BOOLEAN      = TRUE;         { TRUE si se quere que el módulo haga loops   }
  46.                                               { cuando estás en el shell, en vez de pararse.}
  47.  
  48.   DefShellHz = DefaultHz * 3 DIV 4;
  49.   ShellHz      : WORD         = DefShellHz;   { Sample freq when exiting to DOS shell.      }
  50.  
  51.   FadeIncr     : WORD         = 256;          { Velocidad del fade-out.                     }
  52.   VTLoopMod    : BOOLEAN      = FALSE;
  53.  
  54.   VT1stPattern : WORD = 0;
  55.   VTRepStart   : WORD = 0;
  56.   VTSongLen    : WORD = 0;
  57.  
  58.  
  59. VAR
  60.   StdErr       : TEXT;                        { Standard error. Salida no redireccionable.  }
  61.  
  62.   ShellPath    : PathStr;                     { Shell executable.                           }
  63. CONST
  64.   ShellParam   : STRING[127]  = '';           { Shell parameters.                           }
  65.   StringsFName : PathStr      = 'VT_Esp.Lng'; { Fichero de lenguaje.                        }
  66.   ModPath      : PathStr      = '';
  67.  
  68.  
  69.  
  70.  
  71. IMPLEMENTATION
  72.  
  73.  
  74.  
  75.  
  76. {----------------------------------------------------------------------------}
  77. { Module initialization and exit.                                            }
  78. {____________________________________________________________________________}
  79.  
  80. VAR
  81.   OldExitProc : POINTER;
  82.  
  83. PROCEDURE MyExitProc; FAR;
  84.   BEGIN
  85.     ExitProc := OldExitProc;
  86.  
  87.     Close(StdErr);            { Close the standard error. Not necesarily needed, but }
  88.                               { included for cleanliness.                            }
  89.   END;
  90.  
  91. BEGIN
  92.  
  93.   Assign(StdErr, 'CON');      { The standard error will always be the console. }
  94.   Rewrite(StdErr);            { Opened for writing. }
  95.  
  96.   OldExitProc := ExitProc;
  97.   ExitProc    := @MyExitProc; { Set the exit procedure. }
  98.  
  99.   ShellPath := FExpand(GetEnv('COMSPEC'));
  100.  
  101. END.
  102.